using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class transfer_out_recordMap : EntityTypeConfiguration<transfer_out_record>
    {
        public transfer_out_recordMap()
        {
            // Primary Key
            this.HasKey(t => t.transfer_out_record_id);

            // Properties
            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.patient_id)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.transfer_reason_desc)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("transfer_out_record");
            this.Property(t => t.transfer_out_record_id).HasColumnName("transfer_out_record_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.transfer_time).HasColumnName("transfer_time");
            this.Property(t => t.transfer_reason).HasColumnName("transfer_reason");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.transfer_reason_desc).HasColumnName("transfer_reason_desc");
        }
    }
}
